package com.lam.smartbutlerv4.utils;
/*
 *  project name:       SmartButlerV5
 *  pakcage name:       com.lam.smartbutlerv4.utils
 *  file name:          NumUtil
 *  create date:        2019/2/19 0:10
 *  creator:            Luan Xiyuan
 *  description:        TODO
 */

public class NumUtil {
    public static String NumberFormat(float f,int m){
        return String.format("%."+m+"f",f);
    }

    public static float NumberFormatFloat(float f,int m){
        String strfloat = NumberFormat(f,m);
        return Float.parseFloat(strfloat);
    }
}
